<template>
  <div>
    <h3>动态组件</h3>
    <sub-comp :type="typeA" :info="infoA"></sub-comp>
    <sub-comp :type="typeB" :info="infoB"></sub-comp>
  </div>
</template>

<script>
  import subComp from './sub'
  export default {
    name: 'is',
    components: {
      subComp
    },
    data () {
      return {
        typeA: 'subA',
        typeB: 'subB',
        infoA: 'this is the data of infoA',
        infoB: 'this is the data of infoB'
      }
    }
  }
</script>
